package com.miracle.erp.util;

import java.io.IOException;
import java.util.Properties;

public class PropertiesUtil {
	private PropertiesUtil() {

	}

	private static Properties properties = null;

	public static Properties getProperties() {
		return getProperties("jdbc.properties");
	}

	public static Properties getProperties(String fileName) {
		if (properties == null) {
			properties = new Properties();
			try {
				properties.load(PropertiesUtil.class.getClassLoader()
						.getResourceAsStream(fileName));
			} catch (IOException e) {
				e.printStackTrace();
			}
		}
		return properties;
	}
}
